<template>
 <div class="page">
     <div class = 'logo'>
        <img src="./logo.png" alt="">
        <p>第十八届明天小小科学家奖励活动（上海地区）</p>
     </div>
     <div class = 'declare'>
         <button v-if="xmsb" class = 'btn' @click="gologin(1)">项目申报</button>
         <button v-if="xmsh" class = 'btn' @click="gologin(2)">项目审核</button>
         <button v-if="xmps" class = 'btn' @click="gologin(3)">项目评审</button>
     </div>
     
    <a target="_blank" class="bottominf" href="http://www.miitbeian.gov.cn/">备案号: 沪ICP备14033392号-1</a>
     <!-- <div class = 'user'>
         <el-button v-if="user.xs" type="text" @click="cholse(1)">选手</el-button>
         <el-button v-if="user.sh" type="text" @click="cholse(2)">审核</el-button>
         <el-button v-if="user.pw" type="text" @click="cholse(3)">评委</el-button>
         <el-button v-if="user.gly" type="text" @click="cholse(4)">管理员</el-button>
     </div> -->
 </div>
</template>

<script type="text/ecmascript-6">
import login from './../login/index'
 export default {
   data() {
     return {
         xmsb: true,
         xmsh: false,
         xmps: false,
         user: {
             xs: false,
             sh: true,
             pw: true,
             gly: true
         }
     }
   },
   methods: {
       gologin(e) {
           switch (e) {
               case 1:
                 this.$router.push({
                     path: '/login',
                     query: {
                         id: '1'
                     }
                 })
                   
                   break;
               case 2:
                this.$router.push({
                     path: '/login',
                     query: {
                         id: '2'
                     }
                 })
                   break;
               case 3:
                this.$router.push({
                     path: '/login',
                     query: {
                         id: '3'
                     }
                 })
                   break;
           
               default:
                   break;
           }
       },
       cholse(e) {
           switch (e) {
               case 1:
                   this.user.xs = false
                   this.user.sh = true
                   this.user.pw = true
                   this.user.gly = true
                   this.xmsb = true
                   this.xmsh = false
                   this.xmps = false
                   break;
               case 2:
                   this.user.xs = true
                   this.user.sh = false
                   this.user.pw = true
                   this.user.gly = true
                   this.xmsb = false
                   this.xmsh = true
                   this.xmps = false
                   break;
               case 3:
                   this.user.xs = true
                   this.user.sh = true
                   this.user.pw = !this.user.pw
                   this.user.gly = true
                   this.xmsb = false
                   this.xmsh = false
                   this.xmps = true
                   break;
               case 4:
                   this.$router.push({
                       path: '/login',
                       query: {
                           id: '4'
                       }
                   })
                   break;
               default:
                   break;
           }
       }
   },
   components: {

   }
 }
</script>

<style scoped lang="scss">
@import './inlet.scss'; 
</style>
